<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>

		<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
	</head>
	<body>
		<div id="app">
			<display>Hello world!{{name}}</display>
			<display></display>
		</div>
		
		<script>
			var app = Vue.createApp({
				data() {
					return {
						"message": "Hello Vue!",
						"name":"张三"
					}
				}
			});
			app.component('display',{
				template:'<div style="background-color:lightblue;"><h1>子组件</h1><slot>Hello vue!</slot> </div>'
			})
			var vm = app.mount("#app")
		</script>



	</body>
</html>